version=1.0.0
commit="none"
name=${phing.project.name}
summary="Summary"
author.name="Thuy Dinh Xuan"
author.email="thuy.dinh@sutrixmedia.com"
author.username="thuy.dinh"
pear.channel="pear.marcelog.name"
description="Description last commit ${commit}"
dir.bin=/usr/bin
dir.output=${project.basedir}/build
dir.tmp=${dir.output}/tmp
dir.src=${project.basedir}/application/modules/manager/controllers
dir.vendor=${project.basedir}/vendor
dir.vendor.bin=${dir.vendor}/bin
dir.vendor.php=${dir.vendor}/php
phing=${php.exec} /usr/share/php/phing.php -Dversion=${version} -Dcommit=${commit}
;phing=/usr/share/php/phing
package.output.dir=${dir.output}
php.exec=${php.bin} ${php.args}
;php.args=-c ${php.ini} -d include_path=${dir.vendor.php}:${dir.vendor.php}/log4php
php.args=-c ${php.ini}
pear.cfg=${dir.vendor}/.pearrc
defaultpear.exec=${defaultpear.bin} -c ${pear.cfg}
pear.exec=${dir.vendor}/bin/pear -c ${pear.cfg}

; PHP Depend
;phpdepend.exec=${php.exec} ${dir.vendor.bin}/pdepend
phpdepend.exec=${php.exec} /usr/bin/pdepend
phpdepend.output=${dir.output}/php-depend
phpdepend.output.html.dir=${phpdepend.output}/html
phpdepend.output.html.file=${phpdepend.output.html.dir}/index.html
phpdepend.output.xml.dir=${phpdepend.output}
phpdepend.output.xml.file=${phpdepend.output.xml.dir}/php-depend.xml
phpdepend.style=resources/pdepend.xsl
phpdepend.args=--jdepend-xml=${phpdepend.output.xml.file} --jdepend-chart=${phpdepend.output.html.dir}/pdepend.svg --ignore=.git,test/ --overview-pyramid=${phpdepend.output.html.dir}/pyramid.svg ${dir.src}

; PHP CodeSniffer
;phpcs.exec=${php.exec} ${dir.vendor.bin}/phpcs
phpcs.exec=${php.exec} ${dir.bin}/phpcs
phpcs.output=${dir.output}/php-cs
phpcs.output.html.dir=${phpcs.output}/html
phpcs.output.html.file=${phpcs.output.html.dir}/index.html
phpcs.output.xml.dir=${phpcs.output}
phpcs.output.xml.file=${phpcs.output.xml.dir}/php-cs.xml
phpcs.style=resources/checkstyle.xsl
phpcs.args=--report=checkstyle --report-file=${phpcs.output.xml.file} --standard=CodeIgniter --extensions=php --ignore=.git/,doc/,resources/,build ${dir.src}

; PHP Unit test
junit.output.xml.dir=${phpunit.output}
junit.output.xml.file=${junit.output.xml.dir}/junit.xml
junit.style=resources/phpunit_to_surefire.xslt
phpunit.exec=TMPDIR=${dir.output}/tmp TEST=true ${php.exec} ${dir.vendor.bin}/phpunit
phpunit.output=${dir.output}/php-unit
phpunit.output.html.dir=${phpunit.output}/html
phpunit.output.xml.dir=${phpunit.output}
phpunit.output.xml.file=${phpunit.output.xml.dir}/php-unit.xml
phpunit.args=${php.args} --repeat 1 --stop-on-error --stop-on-failure --stop-on-incomplete --debug --verbose --process-isolation --bootstrap ./bootstrap.php --configuration phpunit.xml --log-junit ${phpunit.output.xml.file} --coverage-html ${phpunit.output.html.dir} --verbose

; PHP Mess Detector
;phpmd.exec=${php.exec} ${dir.vendor.bin}/phpmd
phpmd.exec=${php.exec} ${dir.bin}/phpmd
phpmd.output=${dir.output}/php-md
phpmd.output.html.dir=${phpmd.output}/html
phpmd.output.html.file=${phpmd.output.html.dir}/index.html
phpmd.output.xml.dir=${phpmd.output}
phpmd.output.xml.file=${phpmd.output.xml.dir}/php-md.xml
phpmd.style=resources/pmd.xslt
phpmd.args=${dir.src} xml rulesets/codesize.xml,rulesets/unusedcode.xml,rulesets/naming.xml --extensions module --reportfile ${phpmd.output.xml.file}

; PHP Cope Paste
;phpcpd.exec=${php.exec} ${dir.vendor.bin}/phpcpd
phpcpd.exec=${php.exec} ${dir.bin}/phpcpd
phpcpd.output=${dir.output}/php-cpd
phpcpd.output.html.dir=${phpcpd.output}/html
phpcpd.output.html.file=${phpcpd.output.html.dir}/index.html
phpcpd.output.xml.dir=${phpcpd.output}
phpcpd.output.xml.file=${phpcpd.output.xml.dir}/php-cpd.xml
phpcpd.style=resources/cpd.xslt
phpcpd.args=--log-pmd ${phpcpd.output.xml.file} --verbose ${dir.src}

; PHP Documentation
;phpdoc.exec=${php.exec} ${dir.vendor.bin}/docblox
phpdoc.exec=${php.exec} ${dir.bin}/docblox
phpdoc.output=${dir.output}/php-doc
phpdoc.output.html.dir=${phpdoc.output}/html
phpdoc.args=-d ${dir.src} -t ${phpdoc.output.html.dir} --sourcecode --visibility public,protected,private --parseprivate --title ${summary}

phploc.exec=${php.exec} ${dir.vendor.bin}/phploc
phploc.output=${dir.output}/php-loc
phploc.output.html.dir=${phploc.output}/html
phploc.output.html.file=${phploc.output.html.dir}/phploc.txt
phploc.args=${dir.src}

phar=${name}-${version}-${commit}.phar
genphar.exec=${php.exec} resources/generatePhar.php
genphar.args=${package.output.dir}/${phar} ${dir.src}
peartgz=${name}-${version}.tgz

genpear.exec=${php.exec} resources/generatePackageXml.php ${name} ${summary} ${description} ${version} ${author.name} ${author.email} ${author.username} ${pear.channel}
